import Cookies from 'js-cookie'

export default {
  setLang(lang) {
    Cookies.set('user_lang', lang)
  },
  getLang(defaultLang) {
    const localLang = Cookies.get('user_lang');
    if (localLang === null) {
      return defaultLang;
    } else {
      return localLang;
    }
  }
};
